1. Field of the Invention
The present invention relates to a serial data communicating method, and more particularly, to a method for asynchronously transmitting and receiving data using a serial port of a digital signal processor (DSP).
2. Background Art
A 32-bit floating point processor such as the TMS320C30 digital signal processor (DSP) by Texas Instruments (TI.RTM.) is a dedicated digital processor which has been widely used in a servo controller and for image processing. A general digital signal processor has a serial port or a parallel port to transmit and receive data to and from another processor. The TMS320C30 DSP has a synchronous serial communication port, and performs asynchronous serial communication with another TMS320C30 DSP at high speed through the serial communication port.
In general, it would be convenient if the DSP serial port could be connected to a general-purpose system such as a personal computer (PC) or a notebook computer. For instance, a program coded on a PC can be downloaded to the DSP, or data of the DSP can be continuously logged by a PC during the operation of the DSP system. If the output values of a controller of a servo system using DSP are logged and then analyzed by a PC, an optimal controller could be easily realized. Also, a notebook computer could issue an operation command to a DSP system so that the DSP system could perform a specific operation, whereby a simple emulation may be performed. That is, an external system could be tested irrespective of the working place and equipment, if the DSP serial port could be connected to a general-purpose system.
Currently, however, the DSP can not perform data communication with a general purpose computer system such as a PC or a notebook PC in a serial communication method using a serial port of the DSP. Therefore, a special asynchronous communication method is required to realize serial communication with the general-purpose computer system. Asynchronous data reception is discussed in U.S. Pat. No. 5,155,486 to Philip J. Murfet et al. entitled Asynchronous Serial Data Receiver With Capability For Sampling The Mid-Point Of Data Bits and U.S. Pat. No. 5,623,522 to Masahiro Ito entitled Asynchronous Serial Data Receiving Device. The asynchronous communication, however, needs some hardware and software, because of the fact that asynchronous data begins with a start bit which is not part of the actual data. That is, the start of reception of data is recognized using the start bit, and the following bits are read according to the value of a reception timer counter register. Also, upon transmission of data, the bits are transmitted one by one using a transmission timer counter register.
Through a communication experiment, I have found that the transmission and reception timer counters in the TMS320C30 DSP perform a continuous counting operation in synchronization with a clock pulse of a processor, regardless of whether serial communication is performed or not. Accordingly, the values of the transmission and reception timer counters s are not consistent at the point of time when the start bit is transmitted or received, which causes a communicational failure during lengthy communications.